﻿@model IEnumerable<Article>
@{
    Ajax.Dna().Widget()
        .Preview(@<text>
       <ol style="overflow: hidden; padding-left: 30px;">
        @for (int i = 0; i < 10; i++)
        {
            <li  style="clear: right;"><a href="javascript:void(0);">post title @i text <span style="float: right; color: #cccccc;">(1000)</span></a></li>
        }
    </ol>
    </text>)
.Content(@<text>
    @if (Model.Count() > 0)
    {
        <ol style="overflow: hidden; padding-left: 30px;">
            @foreach (var art in Model)
            {
                var article = new ArticleWrapper(art);
                if (!article.IsVisible(Context))
                {
                    continue;
                }
                <li style="clear: right;">
                    @Publishing.PostLink(art) <span style="float: right; color: #cccccc;">(@(article.TotalReads.ToString()))</span>
                </li>
            }
        </ol>
    }
    else
    { 
        <div class="ui-state-highlight" style="padding: 10px;">
            @Html.Global("publishing", "NoArticles")</div>
    }
    </text>)
        .Render();
}
